//
//  NSObject+ViewController.m
//  继承与NSObject的类中弹出UIAlerVIewController
//
//  Created by mac on 16/4/25.
//  Copyright © 2016年 张先红. All rights reserved.
//

#import "NSObject+ViewController.h"

@implementation NSObject (ViewController)

+ (UIViewController *)ViewController{
    
    UITabBarController *tabC = (UITabBarController *)[[[UIApplication sharedApplication] keyWindow] rootViewController];
    
    UIViewController *viewC = tabC.selectedViewController;
    return viewC;
}


@end
